/**********************************************
*  Classes:   GeometryNode
*  Desc:      Defines a geometry node. Derives 
*			  from TransformNode. 
*  Author:    Vaios Kalpias-Ilias (C) 2008-2009
***********************************************/

#ifndef GEOMETRYNODE_H
#define GEOMETRYNODE_H

#include "TransformNode.h"


class GeometryNode : public TransformNode
{
public:

	GeometryNode();
	virtual ~GeometryNode();

	
	virtual const NodeType GetType() const
	{
		return NODE_GEOMETRY;
	}

	// clone mesh
	virtual GeometryNode* Clone();

	// getters
	unsigned int GetVerticesCount() const
	{
		return m_uiNumOfVertices;
	}

	unsigned int GetVerticesName() const
	{
		return m_uiVBOVertices;
	}

	unsigned int GetNormalsName() const
	{
		return m_uiVBONormals;
	}

	unsigned int GetTexCoordsName() const
	{
		return m_uiVBOTexCoords;
	}

	// setters
	void SetVerticesName(unsigned int& n)
	{
		m_uiVBOVertices = n;
	}

	void SetNormalsName(unsigned int& n)
	{
		m_uiVBONormals = n;
	}

	void SetTexCoordsName(unsigned int& n)
	{
		m_uiVBOTexCoords = n;
	}

	void SetNumOfVertices(unsigned int num)
	{
		m_uiNumOfVertices = num;
	}

	void SetVoidData (void* data)
	{
		m_pVoidData = data;
	}

	void* GetVoidData() const
	{
		return m_pVoidData;
	}
protected:

	// void data for renderer use
	void* m_pVoidData;
	// Vertex VBO Name
	unsigned int	m_uiVBOVertices;	
	// Normals VBO Name
	unsigned int	m_uiVBONormals;
	// Texture Coordinate VBO Name
	unsigned int	m_uiVBOTexCoords;
	// number of vertices
	unsigned int m_uiNumOfVertices;

	// pre update
	virtual void PreUpdate();
	// post update 
	virtual void PostUpdate();


};

SmartPointer(GeometryNode);

#endif